Numerical control device

ABSTRACT

A numerical control device includes: a tool-side displacement measurement unit; a workpiece-side displacement measurement unit; a drive signal measurement unit; a relative displacement calculation unit between the tool and the workpiece; a relative displacement prediction unit calculating a relative displacement predicted value from the drive signal, from a prediction model representing a relationship between the drive signal and the relative displacement; a model parameter operation unit generating prediction model parameters constituting the prediction model, from the drive signal, the relative displacement, and the predicted value; and a command value correction unit outputting a post-correction position command obtained by correcting a position command to the drive unit using the prediction model parameters. The model parameter operation unit changes the prediction model parameters to reduce a difference between the relative displacement and the predicted value.

FIELD

The present invention relates to a numerical control device forcontrolling a machine tool in accordance with a machining program.

BACKGROUND

When a machine tool performs machining, a driving force of a movablebody may sometimes cause a relative displacement between the movablebody and a non-movable body to be vibrational, thereby degradingmachining accuracy and quality. To this problem, Patent Literature 1proposes a technique in which a numerical control device predicts arelative displacement using a prediction model created in advance forpredicting the relative displacement, and performs feedforwardcorrection based on the predicted relative displacement. This techniquecan be used even when a drive direction is different from a vibrationdirection.

CITATION LIST Patent Literature

Patent Literature 1: Japanese Patent No. 6180688

SUMMARY Technical Problem

However, in actual machining, the relative displacement between the tooland the workpiece changes due to a change in the inertia of the machinetool such as a change in the weight of the workpiece mounted or a changein the positional relationship between the tool and the workpiece. Inthe technique described in Patent Literature 1, a change in the inertiaof the machine tool is not taken into consideration. Thus, when theinertia of the machine tool has changed, a proper correction cannot bemade on a command from the numerical control device.

The present invention has been made in view of the above circumstances,and its object is to provide a numerical control device capable ofsuppressing the occurrence of vibration in a relative displacementbetween a tool and a workpiece when the inertia of a machine tool haschanged.

Solution to Problem

In order to solve the above-described problem and achieve the object,the present invention provides a numerical control device forcontrolling a relative displacement between a tool and a workpiece in amachine tool using a command to a drive unit driving a motor, thenumerical control device comprising: a tool-side displacementmeasurement unit to measure a physical quantity related to adisplacement of the tool; a workpiece-side displacement measurement unitto measure a physical quantity related to a displacement of theworkpiece; a drive signal measurement unit to measure a drive signaloutputted from the drive unit to the motor; a relative displacementcalculation unit to calculate a relative displacement between the tooland the workpiece from the physical quantity related to the displacementof the tool and the physical quantity related to the displacement of theworkpiece; and a relative displacement prediction unit to calculate arelative displacement predicted value that is a predicted value of therelative displacement from the drive signal, based on a prediction modelrepresenting a relationship between the drive signal and the relativedisplacement. The numerical control device of the present inventionfurther comprises: a model parameter operation unit to generateprediction model parameters constituting the prediction model, based onthe drive signal, the relative displacement generated by the relativedisplacement calculation unit, and the relative displacement predictedvalue; and a command value correction unit to output as the command apost-correction position command obtained by correcting a positioncommand to the drive unit using the prediction model parameters. Themodel parameter operation unit changes the prediction model parametersto reduce a difference between the relative displacement generated bythe relative displacement calculation unit and the relative displacementpredicted value.

Advantageous Effects of Invention

The numerical control device according to the present invention has anadvantageous effect of being able to suppress the occurrence ofvibration in a relative displacement between the tool and the workpiecewhen the inertia of the machine tool has changed.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram schematically illustrating an example of aconfiguration of a machine tool according to a first embodiment of thepresent invention.

FIG. 2 is a block diagram illustrating an example of a functionalconfiguration of a numerical control device according to the firstembodiment.

FIG. 3 is a flowchart illustrating an example of a generation processingprocedure of prediction model parameters before a machining operationaccording to the first embodiment.

FIG. 4 is a flowchart illustrating an example of a procedure forcalculating an optimal solution using particle swarm optimizationaccording to the first embodiment.

FIG. 5 is a graph illustrating an effect due to changing predictionmodel parameters according to the first embodiment.

FIG. 6 is a block diagram illustrating an example of a functionalconfiguration of a numerical control device according to a secondembodiment of the present invention.

FIG. 7 is a block diagram illustrating an example of a functionalconfiguration of a filtering unit according to the second embodiment.

FIG. 8 is a block diagram illustrating an example of a functionalconfiguration of a numerical control device according to a thirdembodiment of the present invention.

FIG. 9 is a block diagram illustrating an example of a functionalconfiguration of a numerical control device according to a fourthembodiment of the present invention.

FIG. 10 is a block diagram illustrating an example of a functionalconfiguration of a machine learning device according to the fourthembodiment.

FIG. 11 is a flowchart illustrating an operation flow of the machinelearning device using reinforcement learning according to the fourthembodiment.

FIG. 12 is a diagram illustrating a hardware configuration when thefunctions of the numerical control device according to the first tofourth embodiments are implemented by a computer system.

DESCRIPTION OF EMBODIMENTS

Hereinafter, a numerical control device according to embodiments of thepresent invention will be described in detail with reference to thedrawings. Note that the invention is not necessarily limited by theseembodiments.

First Embodiment

FIG. 1 is a diagram schematically illustrating an example of aconfiguration of a machine tool 1 according to a first embodiment of thepresent invention. FIG. 2 is a block diagram illustrating an example ofa functional configuration of a numerical control device 8 according tothe first embodiment. In FIG. 1, the numerical control device 8 and adrive unit 11 connected to the machine tool 1 are not illustrated.

The machine tool 1 includes a bed 2 serving as a base, a table 4 that ismovable in a horizontal direction and is rotatable in a horizontal planewhile holding a workpiece 3 to be machined, a head 6 movable in avertical direction while holding a tool 5, and a column 7 that is fixedon the bed 2 and supports the head 6.

The numerical control device 8 is connected to the machine tool 1 andthe drive unit 11 that drives a motor of the machine tool 1, withcontrolling the position and speed of the motor. The numerical controldevice 8 is a device that outputs movement commands to the drive unit11, according to a machining program for machining the workpiece 3.According to an instruction from the numerical control device 8, in themachine tool 1, the table 4 moves in a horizontal direction or rotatesin the horizontal plane, or the head 6 moves in a vertical direction,whereby the workpiece 3 is machined into an intended shape by the tool5. In the machine tool 1, a driving force to move the table 4 propagatesas a reaction force, thereby generating vibration in structures otherthan the workpiece 3. The structures in which vibration is generatedinclude the column 7. When such vibration occurs, the relative positionof the tool 5 with respect to the workpiece 3 vibrates.

The following describes the operation of the numerical control device 8to prevent degradation of machining accuracy or work surface qualitywhen vibration as described above has occurred.

The drive unit 11 generates a drive signal for moving the table 4 or thehead 6, according to a movement command from the numerical controldevice 8, and outputs the generated drive signal to the motor of themachine tool 1. According to the drive signal, the motor mounted to themachine tool 1 is driven, thereby translationally driving orrotationally driving the table 4 or the head 6. As a result, therelative displacement between the tool 5 and the workpiece 3 in themachine tool 1 is controlled. The first embodiment describes a casewhere the table 4 is moved. In the description here, an object drivenlike the table 4 is referred to as a driven object, and an object notdriven like the head 6 as a non-driven object.

The numerical control device 8 includes a tool-side displacementmeasurement unit 9, a workpiece-side displacement measurement unit 10, adrive signal measurement unit 12, a relative displacement calculationunit 13, a model parameter operation unit 14, a relative displacementprediction unit 15, a command value correction unit 16, and a positioncommand generation unit 17.

The tool-side displacement measurement unit 9 acquires a physicalquantity related to the displacement of the tool 5 from a sensorattached to the head 6 or the tool 5, and outputs the quantity to therelative displacement calculation unit 13. The displacement of the tool5 means the amount of change in the position of the tool 5. The sensormay be any sensor capable of acquiring a physical quantity related tothe displacement of the tool 5, such as an acceleration sensor, a speedsensor, or a displacement sensor.

The workpiece-side displacement measurement unit 10 acquires a physicalquantity related to the displacement of the workpiece 3 from a sensorattached to the workpiece 3, the table 4, or the bed 2, and outputs thequantity to the relative displacement calculation unit 13. Thedisplacement of the workpiece 3 means the amount of change in theposition of the workpiece 3. The sensor may be any sensor capable ofacquiring a physical quantity related to the displacement of theworkpiece 3, such as an acceleration sensor, a speed sensor, or adisplacement sensor.

The drive signal measurement unit 12 acquires a drive signal outputtedfrom the drive unit 11, and outputs the drive signal to the relativedisplacement prediction unit 15 and the model parameter operation unit14.

The relative displacement calculation unit 13 calculates the relativedisplacement between the tool 5 and the workpiece 3 from the physicalquantity related to the displacement of the tool 5 acquired from thetool-side displacement measurement unit 9 and the physical quantityrelated to the displacement of the workpiece 3 acquired from theworkpiece-side displacement measurement unit 10. The relativedisplacement between the tool 5 and the workpiece 3 means the amount ofchange in the position of the tool 5 with respect the position of theworkpiece 3 or the amount of change in the position of the workpiece 3with respect to the position of the tool 5, or a difference between thedisplacement of the tool 5 and the displacement of the workpiece 3. As ageneration procedure, first, the difference between the physicalquantity related to the displacement acquired from the tool-sidedisplacement measurement unit 9 and the physical quantity related to thedisplacement acquired from the workpiece-side displacement measurementunit 10 is taken to obtain difference information on displacement. Whenthe difference information corresponds to data in a dimension ofacceleration, a relative displacement is calculated by performingsecond-order integration of the data with respect to time. When thedifference information corresponds to data in a dimension of velocity, arelative displacement is calculated by performing first-orderintegration of the data with respect to time. When the differenceinformation corresponds to data in a dimension of position, the data isgenerated as a relative displacement without performing integrationoperation on the data. The relative displacement generated by therelative displacement calculation unit 13 is outputted to the modelparameter operation unit 14.

The model parameter operation unit 14 computes and generates aprediction model parameter based on the relative displacement acquiredfrom the relative displacement calculation unit 13, the drive signalacquired from the drive signal measurement unit 12, and a relativedisplacement predicted value acquired from the relative displacementprediction unit 15 described later. A prediction model is a modelexpressed by a relational expression representing a correlation with thedrive signal as an input and with the relative displacement in athree-dimensional space between the workpiece 3 and the tool 5 as anoutput. Parameters constituting the prediction model are referred to asprediction model parameters. A method of generating a prediction modelparameter differs in processing procedure between before a machiningoperation and during a machining operation, details of which will bedescribed later. The prediction model parameter determined bycomputation of the model parameter operation unit 14 is outputted to therelative displacement prediction unit 15 and the command valuecorrection unit 16.

The relative displacement prediction unit 15 constructs a predictionmodel using the prediction model parameters acquired from the modelparameter operation unit 14. Based on the constructed prediction model,the relative displacement prediction unit 15 calculates the relativedisplacement predicted value, which is a predicted value of the relativedisplacement, from the drive signal acquired from the drive signalmeasurement unit 12.

The position command generation unit 17 reads a machining program formachining the workpiece 3, and outputs a position command as a movementcommand for the drive unit 11 to the command value correction unit 16.

The command value correction unit 16 corrects the position command in amethod described later, the position command being acquired from theposition command generation unit 17, and determines a post-correctionposition command to cause the drive unit 11 to drive the machine tool 1so that the relative displacement does not vibrate to output thepost-correction position command to the drive unit 11.

Generation processing procedures of prediction model parameters before amachining operation and during a machining operation in the modelparameter operation unit 14 will be described individually.

First, a generation processing procedure of prediction model parametersbefore a machining operation will be described. Before a machiningoperation, the drive unit 11 is caused to output a drive signal forvibrating the machine tool 1. The model parameter operation unit 14acquires the drive signal at that time from the drive signal measurementunit 12, and the model parameter operation unit 14 acquires a relativedisplacement at that time from the relative displacement calculationunit 13. From the acquired drive signal and relative displacement, themodel parameter operation unit 14 derives parameters of a predictionmodel that is a state space model capable of expressing the relationshipbetween the drive signal and vibration generated in the relativedisplacement, that is, prediction model parameters. Here, the modelparameter operation unit 14 derives the prediction model parameters,using a model obtained by a simulation based on the finite elementmethod or a kinetic model, a model obtained by system identification, ora model approximated by order reduction or the like from a modelobtained by system identification. However, the method of deriving theparameters of the prediction model is not necessarily limited to thesemethods. In this example, parameters of a prediction model ofstate-space representation are derived based on a model approximated byorder reduction or the like from a model obtained by the systemidentification.

FIG. 3 is a flowchart illustrating an example of a generation processingprocedure of prediction model parameters before a machining operationaccording to the first embodiment. First, for a preliminary preparationfor the generation processing procedure of prediction model parametersbefore a machining operation, sensors are attached to both the tool sideand the workpiece side. Specifically, a sensor is attached to the head 6or the tool 5 in order for the tool-side displacement measurement unit 9to be able to acquire tool-side displacement information. Further, asensor is attached to the workpiece 3, the table 4, or the bed 2 inorder for the workpiece-side displacement measurement unit 10 to be ableto acquire workpiece-side displacement information.

When the above preliminary preparation is completed, the user instructsthe start of the generation processing of prediction model parameters,and an input device of the numerical control device 8 receives theinstruction to start the generation processing of prediction modelparameters (step S1).

Next, the drive unit 11 outputs a drive signal for vibrating the machinetool 1 (step S2). The drive signal is a vibration signal different froma signal used when actual machining is performed. The vibration signalmay be any signal having a frequency band including the vibrationfrequency of vibration of a relative displacement generated between thetool 5 and the workpiece 3, for which a pseudorandom signal, a sinesweep signal, or the like is used.

Then, the model parameter operation unit 14 acquires the drive signalcurrently subjected to vibration from the drive signal measurement unit12, and acquires a relative displacement at that time from the relativedisplacement calculation unit 13 (step S3).

The model parameter operation unit 14 produces a prediction model fromthe acquired drive signal and relative displacement using a systemidentification method. The model parameter operation unit 14 performsapproximation by order reduction or the like on the produced predictionmodel, thereby producing a prediction model simulating vibration of therelative displacement that affects machining accuracy and quality (stepS4). To produce a prediction model specifically means to determineprediction model parameters that are parameters representing theprediction model.

The model parameter operation unit 14 outputs the prediction modelparameters constituting the prediction model produced in step S4 to therelative displacement prediction unit 15 and the command valuecorrection unit 16 (step S5). In this example, those in the state-spacerepresentation of the produced prediction model are used as theprediction model parameters. However, the prediction model parametersare not necessarily limited to those in the state-space representation.

The command value correction unit 16 acquires a position command fromthe position command generation unit 17, acquires a relativedisplacement predicted value from the relative displacement predictionunit 15, and acquires prediction model parameters from the modelparameter operation unit 14. Based on the acquired position command,relative displacement predicted value, and prediction model parameters,the command value correction unit 16 outputs a post-correction positioncommand to cause the drive unit 11 to drive the machine tool 1 so thatthe relative displacement does not vibrate with respect to the positioncommand.

A method of generating the post-correction position command in thecommand value correction unit 16 is as follows as described in PatentLiterature 1. Specifically, the command value correction unit 16predicts a relative displacement that is the amount of movement of thenon-driven object, based on the prediction model constructed using theprediction model parameters acquired from the model parameter operationunit 14, and predicts the amount of movement of the driven object basedon a predetermined model for predicting the amount of movement of thedriven object. Then, the command value correction unit 16 calculates afeedback gain by the design of an optimum regulator, and calculates theamount of correction to the position command to reduce the amount ofmovement of the non-driven object, using the predicted amounts ofmovement of the non-driven object and the driven object and informationincluding the feedback gain. The command value correction unit 16outputs a post-correction position command obtained by correcting theposition command with the calculated amount of correction as a commandto the drive unit 11. However, the correction method in the commandvalue correction unit 16 is not limited to this manner. The frequency ofvibration of a relative displacement may be determined from a predictionmodel, and such a filter as to suppress vibration of that frequency maybe set in the command value correction unit 16. By the correction of theposition command as described above, it is possible to suppressvibration generated in the relative displacement between the tool 5 andthe workpiece 3 when the table 4 is moved.

However, when the weight or the shape of the workpiece 3, a jig, a vise,a measuring instrument, the tool 5, or the like greatly changes, whenthe positional relationship between the tool 5 and the workpiece 3greatly changes as a result of a translational drive or a rotationaldrive, or when an environmental change, degradation over time, or thelike occurs, the inertia of the machine tool 1 changes. When the inertiaof the machine tool 1 changes, the vibration characteristics of therelative displacement changes, so that it becomes difficult to correctlypredict the relative displacement by the prediction model produced bythe above-described method. As a result, the relative displacement canbecome vibrational.

Therefore, when the inertia of the machine tool 1 has changed, thenumerical control device 8 according to the first embodiment executesprediction model parameter change processing for changing a predictionmodel parameter. The prediction model parameter change processing isperformed by the model parameter operation unit 14 during a machiningoperation. The following describes the prediction model parameter changeprocessing.

During a machining operation, the model parameter operation unit 14determines a time when acceleration is ended or a time when decelerationis ended from a drive signal acquired from the drive signal measurementunit 12. Then, the model parameter operation unit 14 acquires from therelative displacement calculation unit 13 a relative displacement for anarbitrary period of time from the time when acceleration is ended or thetime when deceleration is ended. The model parameter operation unit 14acquires a relative displacement predicted value from the relativedisplacement prediction unit 15. Then, the model parameter operationunit 14 calculates the absolute value of a difference between theacquired relative displacement predicted value and the acquired relativedisplacement. This absolute value is regarded as a prediction error ofrelative displacement.

When the inertia of the machine tool 1 has not greatly changed at thetime of vibration before the machining operation, the prediction errorof relative displacement has a very small value near zero because thevibration of the relative displacement is suppressed by apost-correction position command. However, when the inertia of themachine tool 1 has greatly changed, the prediction error of relativedisplacement becomes vibrational, and so vibration at that time ispredicted. Specifically, when the prediction error of relativedisplacement becomes larger than a threshold value, the model parameteroperation unit 14 calculates the vibration frequency, the amplitude, thedamping ratio, and the phase of vibration of the relative displacementacquired from the relative displacement calculation unit 13, using anoptimization method. The threshold value is set to a predeterminedproper positive value so that optimization is performed only whennecessary. If the accuracy of the prediction model at the time ofvibration is sufficiently good, the relative displacement predictedvalue has sufficiently reduced vibration. Therefore, the relativedisplacement predicted value is assumed to be zero here, and thevibration of the relative displacement is calculated by the optimizationmethod. In this example, the description is made using particle swarmoptimization (PSO) that is a publicly known method as an optimizationmethod, but the optimization method for determining the vibration of arelative displacement is not necessarily limited to this method.

An optimization formula in particle swarm optimization is expressed bynumerical formulas (1) and (2) below.

[Formula 1]

v _(i) ^(k+1) =w·v _(i) ^(k) +c ₁·rand_(1i)·(pbest_(i) ^(k) −x _(i)^(k))+c ₂·rand_(2i)·(gbest−x _(i) ^(k))   (1)

[Formula 2]

x _(i) ^(k+1) =x _(i) ^(k) +v _(i) ^(k+1)   (2)

A subscript i in numerical formulas (1) and (2) represents a particlenumber (the number of particles), a superscript k represents a searchnumber, w, c₁, and c₂ represent weighting factors in their respectiveterms, rand_(1i) and rand_(2i) represent uniform random numbers from 0to 1, x_(i) ^(k) represents a position vector at the current searchnumber k of the i-th particle, v_(i) ^(k) represents a movement vectorat the current search number k of the i-th particle, x_(i) ^(k+1)represents a position vector at the next search number k+1 of the i-thparticle, v_(i) ^(k+1) represents a movement vector at the next searchnumber k+1 of the i-th particle, pbest_(i) represents the past bestsolution of the i-th particle, and gbest represents the past bestsolution of all particles.

The vibration of a relative displacement acquired by the model parameteroperation unit 14 from the relative displacement calculation unit 13 isassumed to be able to be estimated as in the following numerical formula(3).

[Formula 3]

y=A·exp(−2·π·f·ζ)·sin(2·π·f·t+Φ)   (3)

In numerical formula (3), y represents an estimated relativedisplacement, A represents an amplitude, f represents a vibrationfrequency, ζ represents a damping ratio, ϕ represents a phase, and trepresents an amount of time from an acceleration ending or adeceleration ending. At this time, with setting a position vector x_(i)^(k)=[A, f, ζ, ϕ], an amplitude, a vibration frequency, a damping ratio,and a phase are obtained such that the absolute value of the differencebetween the relative displacement y estimated by numerical formula (3)and the relative displacement acquired from the relative displacementcalculation unit 13 is minimized.

FIG. 4 is a flowchart illustrating an example of a procedure forcalculating an optimal solution using particle swarm optimizationaccording to the first embodiment. Each step in the flowchart of FIG. 4is executed by the model parameter operation unit 14.

First, the model parameter operation unit 14 sets initial values inparticle swarm optimization (step S101). Specifically, what are properlyset are a maximum value of the particle number i which is the totalnumber of particles, a maximum value of the search number k which is thetotal search number, the weighting factors w, c₁, and c₂, an initialvalue x_(i) ⁰ of the position vector of each particle, an initial valuev_(i) ⁰ of the movement vector of each particle, an initial valuepbest_(i) ⁰ of the past best solution of the i-th particle, and aninitial value of the past best solution gbest of all the particles.

Next, search number k=0 is set (step S102).

Next, particle number i=1 is set (step S103).

Next, according to numerical formula (1), the movement vector v_(i)^(k+1) at the next search number k+1 is calculated (step S104).

Next, according to numerical formula (2), the position vector x_(i)^(k+1) at the next search number k+1 is calculated (step S105).

Next, using the position vector x_(i) ^(k+1) determined in step S105,the relative displacement y estimated by numerical formula (3) iscalculated as y_(i) (step S106).

Next, the current evaluation value Y_(i) ^(k+1)=|y_(i)−y_(ref)| of thei-th particle is calculated (step S107), the evaluation value being theabsolute value of the difference between the relative displacement y_(i)estimated in step S106 and the relative displacement y_(ref) acquiredfrom the relative displacement calculation unit 13.

It is determined whether or not the current evaluation value of the i-thparticle calculated in step S107 is smaller than an evaluation valueobtained in the past for the i-th particle (step S108). When it isdetermined that the current evaluation value is smaller than the pastevaluation value (step S108: Yes), the process proceeds to step S109.Otherwise (step S108: No), the process proceeds to step S110.

By setting the position vector x_(i) ^(k+1) determined in step S105 asthe past best solution pbest_(i) of the i-th particle, the past bestsolution pbest_(i) of the i-th particle is updated (step S109). That is,pbest_(i)=x_(i) ^(k+1) is set.

It is determined whether or not the current evaluation value of the i-thparticle calculated in step S107 is smaller than evaluation valuesobtained in the past for all the particles (step S110). When it isdetermined that the current evaluation value is smaller than the pastevaluation values of all the particles (step S110: Yes), the processproceeds to step S111. Otherwise (step S110: No), the process proceedsto step S112.

By setting the past best solution pbest_(i) of the i-th particle as thepast best solution gbest of all the particles, the past best solutiongbest of all the particles is updated (step S111). That is,gbest=pbest_(i) is set.

The particle number i is incremented by one, with i=i+1, to be updated(step S112).

Next, it is determined whether or not the particle number i is largerthan the total particle number set in step S101 (step S113). When it isdetermined that the particle number i is larger than the total particlenumber set in step S101 (step S113: Yes), the process proceeds to stepS114. Otherwise (step S113: No), the process proceeds to step S104.

The search number k is incremented by one, with k=k+1, to be updated(step S114).

Next, it is determined whether or not the search number k is larger thanthe total search number set in step S101 (step S115). When it isdetermined that the search number k is larger than the total searchnumber set in step S101 (step S115: Yes), the process proceeds to stepS116. Otherwise (step S115: No), the process proceeds to step S103.

The past best solution gbest of all the particles is set as the finaloptimal solution (step S116). It is determined that this best solutiongbest corresponds to the vibration frequency, the amplitude, the dampingratio, and the phase of vibration of the relative displacement acquiredfrom the relative displacement calculation unit 13.

The model parameter operation unit 14 changes the prediction model byapplying the vibration frequency and others determined as describedabove to portions of the prediction model corresponding to the vibrationfrequency and others.

Here, it is assumed that the prediction model is concretely expressed bya transfer function as in numerical formula (4) below.

$\begin{matrix}\left\lbrack {{Formula}\mspace{14mu} 4} \right\rbrack & \; \\{{G(s)} = \frac{N(s)}{\left( {s - \lambda} \right)\left( {s - \lambda^{\sim}} \right)}} & (4)\end{matrix}$

In numerical formula (4), s represents a Laplace operator, N(s)represents a polynomial of s, λ represents an eigenvalue of theprediction model, and Δ^(˜) represents a conjugate complex number of λ.In general, a real part λ_(real) and an imaginary part λ_(imag) of theeigenvalue A can be expressed as in numerical formulas (5) and (6) belowusing the vibration frequency f and the damping ratio

[Formula 5]

λ_(real)=ζ·(2·π·f)  (5)

[Formula 6]

λ_(imag)=√{square root over (1−ζ²)}·(2·π·f)  (6)

By substituting the vibration frequency f and the damping ratio ζdetermined in step S116 of the above-described optimization method intothe vibration frequency f and the damping ratio ζ of numerical formulas(5) and (6), the eigenvalue is changed, and the model parameteroperation unit 14 can change the prediction model to a model adapted tothe vibration of the relative displacement acquired from the relativedisplacement calculation unit 13. By the state-space representation ofthe changed prediction model, the prediction model parameters can alsobe changed. Since the relative displacement calculation unit 13calculates the relative displacement from the physical quantitiesrelated to the displacement acquired from the tool-side displacementmeasurement unit 9 and the workpiece-side displacement measurement unit10, the prediction model parameters can be changed according to a changein the inertia of the machine tool 1. When the prediction modelparameter is changed by the model parameter operation unit 14 asdescribed above, the prediction model parameters used by the relativedisplacement prediction unit 15 are changed. Thereby, a differencebetween a relative displacement predicted value outputted by therelative displacement prediction unit 15 based on a drive signal usingthe prediction model parameters and a relative displacement generated bythe relative displacement calculation unit 13 is minimized to be zero.More specifically, the model parameter operation unit 14 changes theprediction model parameters so that the vibration frequency, theamplitude, the damping ratio, and the phase of vibration of a relativedisplacement predicted value predicted by the relative displacementprediction unit 15 correspond to the vibration frequency, the amplitude,the damping ratio, and the phase of vibration of a relative displacementgenerated by the relative displacement calculation unit 13,respectively.

FIG. 5 is a graph illustrating the effect of changing the predictionmodel parameters according to the first embodiment. FIG. 5 is a graphillustrating an example of simulation results on the relativedisplacement in the vertical direction of the tool 5 with respect to theworkpiece 3 when the workpiece 3 is moved in the horizontal direction inthe machine tool 1 as illustrated in FIG. 1.

In FIG. 5, the horizontal axis represents time, and the vertical axisrepresents relative displacement. A curve L1 indicated by a broken linein FIG. 5 represents change over time of the relative displacement inthe vertical direction when only a prediction model constructed before amachining operation is used without making a change of the predictionmodel during the machining operation. A curve L2 indicated by a solidline in FIG. 5 represents change over time of the relative displacementin the vertical direction when the prediction model is changed duringthe machining operation as described above. The prediction model wassubjected to simulation using numerical expression (4) for theprediction model. When the prediction model is not changed during themachining operation, vibrated amplitude in the vertical direction occursas shown by the curve L1 as a result of a change in the vibrationfrequency of vibration of the relative displacement caused by a changein the inertia of the machine tool 1 during operation. On the otherhand, when the prediction model is changed during the machiningoperation, as shown by the curve L2, it is understood that vibratedamplitude in the vertical direction is sufficiently reduced, and thevibration ending time is shortened as compared with the curve L1.

As described above, according to the numerical control device 8 of thefirst embodiment, a prediction model is optimized, that is, predictionmodel parameters are optimized, based on a relative displacementmeasured during a machining operation. This allows inhibition ofoccurrence of vibration in a relative displacement between the tool andthe workpiece when the inertia of the machine tool 1 during a machiningoperation has changed.

Second Embodiment

FIG. 6 is a block diagram illustrating an example of a functionalconfiguration of a numerical control device 81 according to a secondembodiment of the present invention. The numerical control device 81 isdifferent from the numerical control device 8 according to the firstembodiment in that the relative displacement calculation unit 13 ischanged to a relative displacement calculation unit 131.

The relative displacement calculation unit 131 includes a relativedisplacement operation unit 18 and a filtering unit 19. The relativedisplacement operation unit 18 performs the same processing as therelative displacement calculation unit 13 according to the firstembodiment. In the second embodiment, a relative displacement betweenthe tool and the workpiece, which is outputted from the relativedisplacement operation unit 18 is defined as a pre-filtering relativedisplacement. The pre-filtering relative displacement outputted from therelative displacement operation unit 18 is inputted to the filteringunit 19.

FIG. 7 is a block diagram illustrating an example of a functionalconfiguration of the filtering unit 19 according to the secondembodiment. The filtering unit 19 includes a filter parameter settingunit 20 and a band-pass filter 21. The filter parameter setting unit 20estimates the vibration frequency of vibration of a relativedisplacement from prediction model parameters acquired from the modelparameter operation unit 14, and sets a passband centered on thevibration frequency in the band-pass filter 21.

Specifically, when a prediction model expressed by numerical formula (4)can be constructed from the prediction model parameters, the vibrationfrequency of the relative displacement can be easily estimated fromnumerical formulas (5) and (6). If prediction model parameters have notyet been determined before a machining operation, in order for thepre-filtering relative displacement to be used directly as an output ofthe relative displacement calculation unit 131 without making filtering,the filter parameter setting unit 20 also performs setting to enable ordisable the use of the band-pass filter 21. The band-pass filter 21performs filtering on the pre-filtering relative displacement outputtedfrom the relative displacement operation unit 18, based on the settingof the filter parameter setting unit 20, to remove a componentcorresponding to noise from the displacement, and outputs it as arelative displacement. The relative displacement outputted by theband-pass filter 21 is set as a relative displacement generated by therelative displacement calculation unit 131.

When the vibration frequency of vibration of a relative displacement isknown in advance, the filter parameter setting unit 20 may set thepassband of the band-pass filter 21, regardless of the input ofprediction model parameters from the model parameter operation unit 14.The manner of setting the passband in the band-pass filter 21 is notparticularly limited, and it may be a manner of setting plus or minussome tens of Hz of a predicted frequency as a passband, a manner ofadditionally setting frequency ranges of half and twice a predictedfrequency for a passband, or some such manner, in so far as the mannerallows passage of a frequency of a value close to the frequency ofvibration of the relative displacement.

According to the numerical control device 81 of the second embodiment,the model parameter operation unit 14 performs optimization processingon a relative displacement outputted from the filtering unit 19 afterunnecessary vibration is removed as described above, so that accuracy inchanging prediction model parameters is improved. As a result,suppression capability against vibration of the relative displacementcan be further improved.

Third Embodiment

FIG. 8 is a block diagram illustrating an example of a functionalconfiguration of a numerical control device 82 according to a thirdembodiment of the present invention. The numerical control device 82 isdifferent from the numerical control device 8 according to the firstembodiment in that the numerical control device 82 further includes aninertia change information prediction unit 22. Another difference fromthe first embodiment is that whether to enable or disable changeprocessing on prediction model parameters in the model parameteroperation unit 14 is determined based on inertia change informationoutputted from the inertia change information prediction unit 22.

The inertia change information prediction unit 22 acquires inertiainformation on the workpiece 3 outputted from the drive unit 11 or axisposition information outputted from the position command generation unit17, and outputs inertia change information indicating that a change hasoccurred in the inertia of the machine tool 1 to the model parameteroperation unit 14.

The inertia information on the workpiece 3 is estimated inertia of theworkpiece 3 placed on the table 4. As for the estimated inertia of theworkpiece 3, it is known that the inertia of the workpiece 3 to bedriven can be estimated based on a current that is a drive signal at thetime of acceleration or deceleration of the motor and accelerationvalue. Therefore, the drive unit 11 outputs estimated inertia of theworkpiece 3 placed on the table 4 based on a current as a drive signalat the time of acceleration or deceleration of the motor andacceleration value.

The position command generation unit 17 outputs a position command thatis movement information on each drive axis of the machine tool 1 basedon a machining program. Thus, the position command is outputted as axisposition information.

The inertia change information prediction unit 22 stores acquiredestimated inertia, and when determining that a change in the estimatedinertia has become large, the inertia change information prediction unit22 recognizes that the inertia of the machine tool 1 has changed andoutputs inertia change information. A threshold value for the amount ofchange in the estimated inertia, which is required for thedetermination, is preset properly.

The inertia change information prediction unit 22 stores acquired axisposition information, and when determining that the axis positioninformation has changed greatly, the inertia change informationprediction unit 22 recognizes that the inertia of the machine tool 1 haschanged and outputs inertia change information. A threshold value forthe amount of change in the position command, which is required for thedetermination, is preset properly.

Based on the inertia change information acquired from the inertia changeinformation prediction unit 22, the model parameter operation unit 14determines whether to enable or disable the prediction model parameterchange processing. Specifically, when a workpiece 3 having a largeweight is placed on the table 4, the inertia of the machine tool 1changes greatly. Here, the inertia change information is binaryinformation of on or off. The inertia change information prediction unit22 detects that the inertia of the machine tool 1 has greatly changed,based on estimated inertia acquired from the drive unit 11 afteracceleration or deceleration of the motor driving the table 4, and turnsthe inertia change information on and outputs it. Here, the inertiachange information prediction unit 22 stores the acquired estimatedinertia when it has detected the great change in the inertia of themachine tool 1. When the inertia change information is turned on, themodel parameter operation unit 14 performs the prediction modelparameter change processing. After the prediction model parameter changeprocessing is performed, the inertia change information prediction unit22 turns the inertia change information off.

The prediction model parameter change processing is processing requiredwhen the inertia of the machine tool 1 has greatly changed. According tothe numerical control device 82 of the third embodiment, the changeprocessing can be performed only when necessary to prevent unnecessarychange of the prediction model parameters, so that unnecessary operationcost can be eliminated.

Fourth Embodiment

FIG. 9 is a block diagram illustrating an example of a functionalconfiguration of a numerical control device 83 according to a fourthembodiment of the present invention. The numerical control device 83 isdifferent from the numerical control device 8 according to the firstembodiment in that the model parameter operation unit 14 is changed to amodel parameter operation unit 141.

The model parameter operation unit 141 includes a machine learningdevice 100 that learns prediction model parameters and a decision-makingunit 105. The machine learning device 100 includes a state observationunit 101 and a learning unit 102.

The state observation unit 101 observes a relative displacement acquiredfrom the relative displacement calculation unit 13, a relativedisplacement predicted value acquired from the relative displacementprediction unit 15, and a drive signal acquired from the drive signalmeasurement unit 12 as state variables.

The learning unit 102 learns prediction model parameters according to atraining data set that is produced based on the state variables of therelative displacement, the relative displacement predicted value, andthe drive signal.

The learning unit 102 may use any learning algorithm. As an examplethereof, a case where reinforcement learning is applied will bedescribed. In the reinforcement learning, an agent (subject of anaction) in a certain environment observes a current state and determinesan action to take. The agent obtains a reward from the environment byselecting an action, and learns a policy to obtain the most rewardthrough a series of actions. As typical methods of reinforcementlearning, Q-learning and TD-learning are known. For example, in the caseof Q learning, a typical update equation (action value table) of anaction-value function Q(s,a) is expressed by numerical formula (7)below.

[Formula 7]

Q(s _(t) ,a _(t))←Q(s _(t) ,a _(t))+α*r _(t+1)+γ max_(a) Q(s _(t+1) ,a_(t))−Q(s _(t) ,a _(t)))   (7)

In numerical formula (7), s_(t) represents an environment at a time t,and a_(t) represents an action at the time t. By the action a_(t), theenvironment changes to s_(t+1). r_(t+1) represents a reward given by theenvironmental change, γ represents a discount factor, and a represents alearning rate. When Q learning is applied, prediction model parametersconstitute the action a_(t).

In the update equation represented by numerical formula (7), if theaction value of the best action “a” at the time t+1 is larger than theaction value Q of the action “a” performed at the time t, the actionvalue Q is increased. If not, the action value Q is reduced. In otherwords, the action-value function Q(s,a) is updated such that the actionvalue Q of the action a at the time t approaches the best action valueat the time t+1. Consequently, the best action value in a certainenvironment is sequentially propagated to an action value in a previousenvironment.

FIG. 10 is a block diagram illustrating an example of a functionalconfiguration of the machine learning device 100 according to the fourthembodiment. The learning unit 102 further includes a reward calculationunit 103 and a function update unit 104.

The reward calculation unit 103 calculates a reward based on statevariables.

Here, the absolute value of a difference between a relative displacementpredicted value outputted from the relative displacement prediction unit15 and a relative displacement outputted from the relative displacementcalculation unit 13 is a prediction error of relative displacement. Theprediction error of relative displacement is extracted according to apublicly known method. Specifically, the prediction error of relativedisplacement can be determined by measuring the relative displacementand the relative displacement predicted value after acceleration ordeceleration driving of the motor for an axis along which the table 4with the workpiece 3 having a large weight mounted thereon is driven.

The reward calculation unit 103 calculates a reward r, based on theprediction error of relative displacement. More specifically, when theabsolute value of the difference between the vibration frequency of therelative displacement predicted value and the frequency of the relativedisplacement decreases as a result of changing the prediction modelparameters, the reward calculation unit 103 increases the reward r. Toincrease the reward r, a reward of “1” is given. The value of the rewardis not limited to “1”.

When the absolute value of the difference between the amplitude of therelative displacement predicted value and the amplitude of the relativedisplacement increases as a result of changing the prediction modelparameters, the reward calculation unit 103 reduces the reward r. Toreduce the reward r, a reward of “−1” is given. The value of the rewardis not limited to “−1”.

The function update unit 104 updates the function for determining theprediction model parameters, according to the reward calculated by thereward calculation unit 103. The update of the function can be performedaccording to the training data set, specifically by updating the actionvalue table. The action value table is a data set in which any givenactions and their respective action values are associated and stored inthe form of a table. For example, in the case of Q-learning, theaction-value function Q(s_(t),a_(t)) expressed by numerical formula (7)is used as the function for the prediction model parameters.

FIG. 11 is a flowchart illustrating an operation flow of the machinelearning device 100 using reinforcement learning according to the fourthembodiment. With reference to the flowchart of FIG. 11, a reinforcementlearning method for updating the action-value function Q(s,a) will bedescribed.

First, the state observation unit 101 determines an acceleration endingtime or a deceleration ending time, based on a drive signal acquiredfrom the drive signal measurement unit 12 (step S11).

The state observation unit 101 acquires state variables in any givenperiod from the acceleration ending time or the deceleration ending time(step S12). The state variables include a relative displacement, a drivesignal, and a relative displacement predicted value. Since the motor isdriven after completion of acceleration, the relative displacement maycontain unnecessary noise. It is thus desirable to use a relativedisplacement in a stopped state after completion of deceleration as astate variable.

The reward calculation unit 103 calculates a prediction error ofrelative displacement that is the absolute value of a difference betweenthe relative displacement predicted value and the relative displacement(step S13).

The reward calculation unit 103 calculates a reward r, based on theprediction error of elative displacement (step S14).

According to the reward r determined in step S14, the function updateunit 104 updates the action-value function Q(s,a) according to numericalformula (7) (step S15).

The function update unit 104 determines whether updating is no longerperformed in step S15 and the action-value function Q has converged(step S16). When it is determined that the action-value function Q hasnot converged (step S16: No), the process returns to step S11. When itis determined that the action-value function Q has converged (step S16:Yes), learning by the learning unit 102 is ended. Learning may becontinued by returning from step S15 immediately to step S11 withoutproviding step S16.

The decision-making unit 105 selects prediction model parameters toobtain the most reward based on the results of learning of the learningunit 102, that is, the updated action-value function Q(s,a). Byacquiring the prediction model parameters from the decision-making unit105 and correcting a position command, the command value correction unit16 can suppress vibration generated in a relative displacement inaccordance with a change in the inertia of the machine tool 1.

The fourth embodiment has described the case where the learning unit 102performs machine learning using reinforcement learning. However, thelearning unit 102 may perform machine learning according to anotherpublicly known method, a learning algorithm such as a neural network,genetic programming, functional logic programming, or a support vectormachine.

The numerical control devices 8 and 81 to 83 according to the first tofourth embodiments are implemented by a computer system such as apersonal computer or a general-purpose computer. FIG. 12 is a diagramillustrating a hardware configuration when the functions of thenumerical control devices 8 and 81 to 83 according to the first tofourth embodiments are implemented by a computer system. When thefunctions of the numerical control devices 8 and 81 to 83 areimplemented by a computer system, the functions of the numerical controldevices 8 and 81 to 83 are implemented by a central processing unit(CPU) 201, a memory 202, a storage device 203, a display device 204, andan input device 205, as illustrated in FIG. 12. The functions executedby the machine learning device 100 are implemented by software,firmware, or a combination of software and firmware. Software orfirmware is written as programs and stored in the storage device 203.The CPU 201 reads the software or firmware stored in the storage device203 into the memory 202 and executes it, thereby implementing thefunctions of the numerical control devices 8 and 81 to 83. That is, thecomputer system includes the storage device 203 for storing programsthat will be consequently subjected to the execution of the steps toperform the operations of the numerical control devices 8 and 81 to 83according to the first to fourth embodiments when the functions of thenumerical control devices 8 and 81 to 83 are to be executed by the CPU201. It can also be said that these programs cause the computer toexecute the processing realized by the functions of the numericalcontrol devices 8 and 81 to 83. The memory 202 corresponds to a volatilestorage area such as a random access memory (RAM). The storage device203 corresponds to a nonvolatile or volatile semiconductor memory suchas a read-only memory (ROM) or a flash memory, or a magnetic disk.Specific examples of the display device 204 are a monitor and a display.Specific examples of the input device 205 are a keyboard, a mouse, and atouch panel.

The configurations described in the above embodiments illustrate anexample of the subject matter of the present invention, and can becombined with other publicly known arts and can be partly omitted and/ormodified without departing from the scope of the present invention.

REFERENCE SIGNS LIST

1 machine tool; 2 bed; 3 workpiece; 4 table; 5 tool; 6 head; 7 column;8, 81 to 83 numerical control device; 9 tool-side displacementmeasurement unit; 10 workpiece-side displacement measurement unit; 11drive unit; 12 drive signal measurement unit; 13, 131 relativedisplacement calculation unit; 14, 141 model parameter operation unit;15 relative displacement prediction unit; command value correction unit;17 position command generation unit; 18 relative displacement operationunit; filtering unit; 20 filter parameter setting unit; 21 band-passfilter; 22 inertia change information prediction unit; 100 machinelearning device; 101 state observation unit; 102 learning unit; 103reward calculation unit; 104 function update unit; 105 decision-makingunit; 201 CPU; 202 memory; 203 storage device; 204 display device; 205input device.

1. A numerical control device for controlling a relative displacementbetween a tool and a workpiece in a machine tool using a command todrive circuitry driving a motor, the numerical control devicecomprising: tool-side displacement measurement circuitry to measure aphysical quantity related to a displacement of the tool; workpiece-sidedisplacement measurement circuitry to measure a physical quantityrelated to a displacement of the workpiece; drive signal measurementcircuitry to measure a drive signal outputted from the drive circuitryto the motor; relative displacement calculation circuitry to calculate arelative displacement between the tool and the workpiece from thephysical quantity related to the displacement of the tool and thephysical quantity related to the displacement of the workpiece; relativedisplacement prediction circuitry to calculate a relative displacementpredicted value that is a predicted value of the relative displacementfrom the drive signal, based on a prediction model representing arelationship between the drive signal and the relative displacement;model parameter operation circuitry to generate prediction modelparameters constituting the prediction model, based on the drive signal,the relative displacement generated by the relative displacementcalculation circuitry, and the relative displacement predicted value;and command value correction circuitry to output as the command apost-correction position command obtained by correcting a positioncommand to the drive circuitry using the prediction model parameters,wherein the model parameter operation circuitry changes the predictionmodel parameters to reduce a difference between the relativedisplacement generated by the relative displacement calculationcircuitry and the relative displacement predicted value.
 2. Thenumerical control device according to claim 1, wherein the modelparameter operation circuitry changes the prediction model parameters sothat a vibration frequency, an amplitude, a damping ratio, and a phaseof vibration of the relative displacement predicted value correspond toa vibration frequency, an amplitude, a damping ratio, and a phase ofvibration of the relative displacement generated by the relativedisplacement calculation circuitry, respectively.
 3. The numericalcontrol device according to claim 1, wherein the relative displacementcalculation circuitry determines a pre-filtering relative displacementbetween the tool and the workpiece from the physical quantity related tothe displacement of the tool and the physical quantity related to thedisplacement of the workpiece, and performs filtering on thepre-filtering relative displacement using the prediction modelparameters to calculate a relative displacement.
 4. The numericalcontrol device according to claim 1, further comprising: inertiainformation change prediction circuitry to output inertia changeinformation indicating that a change has occurred in inertia of themachine tool, wherein the model parameter operation circuitry changesthe prediction model parameters, based on the inertia changeinformation.
 5. The numerical control device according to claim 1,wherein the model parameter operation circuitry comprises: machinelearning circuitry to learn the prediction model parameters; anddecision-making circuitry to determine the prediction model parameters,based on a result of learning of the machine learning circuitry, and themachine learning circuitry comprises: state observation circuitry toobserve the drive signal, the relative displacement generated by therelative displacement calculation circuitry, and the relativedisplacement predicted value as state variables; and learning circuitryto learn the prediction model parameters according to a training dataset produced based on the state variables.
 6. The numerical controldevice according to claim 2, wherein the relative displacementcalculation circuitry determines a pre-filtering relative displacementbetween the tool and the workpiece from the physical quantity related tothe displacement of the tool and the physical quantity related to thedisplacement of the workpiece, and performs filtering on thepre-filtering relative displacement using the prediction modelparameters to calculate a relative displacement.
 7. The numericalcontrol device according to claim 2, further comprising: inertiainformation change prediction circuitry to output inertia changeinformation indicating that a change has occurred in inertia of themachine tool, wherein the model parameter operation circuitry changesthe prediction model parameters, based on the inertia changeinformation.
 8. The numerical control device according to claim 3,further comprising: inertia information change prediction circuitry tooutput inertia change information indicating that a change has occurredin inertia of the machine tool, wherein the model parameter operationcircuitry changes the prediction model parameters, based on the inertiachange information.
 9. The numerical control device according to claim6, further comprising: inertia information change prediction circuitryto output inertia change information indicating that a change hasoccurred in inertia of the machine tool, wherein the model parameteroperation circuitry changes the prediction model parameters, based onthe inertia change information.
 10. The numerical control deviceaccording to claim 2, wherein the model parameter operation circuitrycomprises: machine learning circuitry to learn the prediction modelparameters; and decision-making circuitry to determine the predictionmodel parameters, based on a result of learning of the machine learningcircuitry, and the machine learning circuitry comprises: stateobservation circuitry to observe the drive signal, the relativedisplacement generated by the relative displacement calculationcircuitry, and the relative displacement predicted value as statevariables; and learning circuitry to learn the prediction modelparameters according to a training data set produced based on the statevariables.
 11. The numerical control device according to claim 3,wherein the model parameter operation circuitry comprises: machinelearning circuitry to learn the prediction model parameters; anddecision-making circuitry to determine the prediction model parameters,based on a result of learning of the machine learning circuitry, and themachine learning circuitry comprises: state observation circuitry toobserve the drive signal, the relative displacement generated by therelative displacement calculation circuitry, and the relativedisplacement predicted value as state variables; and learning circuitryto learn the prediction model parameters according to a training dataset produced based on the state variables.
 12. The numerical controldevice according to claim 6, wherein the model parameter operationcircuitry comprises: machine learning circuitry to learn the predictionmodel parameters; and decision-making circuitry to determine theprediction model parameters, based on a result of learning of themachine learning circuitry, and the machine learning circuitrycomprises: state observation circuitry to observe the drive signal, therelative displacement generated by the relative displacement calculationcircuitry, and the relative displacement predicted value as statevariables; and learning circuitry to learn the prediction modelparameters according to a training data set produced based on the statevariables.
 13. The numerical control device according to claim 4,wherein the model parameter operation circuitry comprises: machinelearning circuitry to learn the prediction model parameters; anddecision-making circuitry to determine the prediction model parameters,based on a result of learning of the machine learning circuitry, and themachine learning circuitry comprises: state observation circuitry toobserve the drive signal, the relative displacement generated by therelative displacement calculation circuitry, and the relativedisplacement predicted value as state variables; and learning circuitryto learn the prediction model parameters according to a training dataset produced based on the state variables.
 14. The numerical controldevice according to claim 7, wherein the model parameter operationcircuitry comprises: machine learning circuitry to learn the predictionmodel parameters; and decision-making circuitry to determine theprediction model parameters, based on a result of learning of themachine learning circuitry, and the machine learning circuitrycomprises: state observation circuitry to observe the drive signal, therelative displacement generated by the relative displacement calculationcircuitry, and the relative displacement predicted value as statevariables; and learning circuitry to learn the prediction modelparameters according to a training data set produced based on the statevariables.
 15. The numerical control device according to claim 8,wherein the model parameter operation circuitry comprises: machinelearning circuitry to learn the prediction model parameters; anddecision-making circuitry to determine the prediction model parameters,based on a result of learning of the machine learning circuitry, and themachine learning circuitry comprises: state observation circuitry toobserve the drive signal, the relative displacement generated by therelative displacement calculation circuitry, and the relativedisplacement predicted value as state variables; and learning circuitryto learn the prediction model parameters according to a training dataset produced based on the state variables.
 16. The numerical controldevice according to claim 9, wherein the model parameter operationcircuitry comprises: machine learning circuitry to learn the predictionmodel parameters; and decision-making circuitry to determine theprediction model parameters, based on a result of learning of themachine learning circuitry, and the machine learning circuitrycomprises: state observation circuitry to observe the drive signal, therelative displacement generated by the relative displacement calculationcircuitry, and the relative displacement predicted value as statevariables; and learning circuitry to learn the prediction modelparameters according to a training data set produced based on the statevariables.